/////////////////////////////////////////////////////////////////////////////
// Name:        wxmudcommandline.h
// Purpose:     
// Author:      Stephen Whittle
// Modified by: 
// Created:     14/09/2009 18:21:30
// RCS-ID:      
// Copyright:   
// Licence:     
/////////////////////////////////////////////////////////////////////////////

#ifndef _WXMUDCOMMANDLINE_H_
#define _WXMUDCOMMANDLINE_H_


/*!
 * Includes
 */

////@begin includes
////@end includes
#include <vector>
/*!
 * Forward declarations
 */

////@begin forward declarations
class wxMudCommandLine;
////@end forward declarations

/*!
 * Control identifiers
 */

////@begin control identifiers
#define ID_CMDBARMAINCTRL 10011
#define SYMBOL_WXMUDCOMMANDLINE_STYLE wxTE_PROCESS_ENTER|wxSIMPLE_BORDER
#define SYMBOL_WXMUDCOMMANDLINE_IDNAME ID_CMDBARMAINCTRL
#define SYMBOL_WXMUDCOMMANDLINE_SIZE wxSize(-1, 25)
#define SYMBOL_WXMUDCOMMANDLINE_POSITION wxDefaultPosition
////@end control identifiers

/*!
 * wxMudCommandLine class declaration
 */

class wxMudCommandLine: public wxTextCtrl
{    
    std::vector<wxString> mHistoryItems;
    size_t mHistoryCurrent;
    DECLARE_DYNAMIC_CLASS( wxMudCommandLine )
    DECLARE_EVENT_TABLE()

public:
    /// Constructors
    wxMudCommandLine();
    wxMudCommandLine(wxWindow* parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator);

    /// Creation
    bool Create(wxWindow* parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator);

    /// Destructor
    ~wxMudCommandLine();

    /// Initialises member variables
    void Init();

    /// Creates the controls and sizers
    void CreateControls();

////@begin wxMudCommandLine event handler declarations

    /// wxEVT_COMMAND_TEXT_ENTER event handler for ID_CMDBARMAINCTRL
    void OnTextEnter( wxCommandEvent& event );

    /// wxEVT_KEY_DOWN event handler for ID_CMDBARMAINCTRL
    void OnInputKeyDown( wxKeyEvent& event );

////@end wxMudCommandLine event handler declarations

////@begin wxMudCommandLine member function declarations

////@end wxMudCommandLine member function declarations

    void SaveCurrHist();
    void DisplayCurrHist();
    void HistPrev();
    void HistNext();
////@begin wxMudCommandLine member variables
////@end wxMudCommandLine member variables
};

#endif
    // _WXMUDCOMMANDLINE_H_
